<?php

class Ebx_Component_Manager {

	private static $_components = array();

	public static function createComponent($componentName, $alias = null) {
		$name = is_string($alias) ? $alias : $componentName;
		if (!isset(self::$_components[$name])) {
			self::$_components[$name] = new Ebx_Component_Container($componentName);
		}
		return self::$_components[$name];
	}

	public static function getComponent($componentName) {
		return isset(self::$_components[$componentName]) ? self::$_components[$componentName] : null;
	}

}

?>